﻿using System;
using System.Windows.Forms;

namespace UNSWThink
{
   /// <summary>
   /// Extended class which hids the tabs in a standard tab control so that it can be used as a wizard page
   /// </summary>
   public class WizardPages : TabControl
   {
   
      /// <summary>
      /// Override WndProc to hide tabs in tab control
      /// </summary>
      /// <param name="m">
      /// Reference message
      /// </param>
      protected override void WndProc(ref Message m)
      {
         // Hide tabs by trapping the TCM_ADJUSTRECT message
         if (m.Msg == 0x1328 && !DesignMode) m.Result = (IntPtr)1;
         else base.WndProc(ref m);
      }

      private void InitializeComponent()
      {
         this.SuspendLayout();
         this.ResumeLayout(false);

      }
   }
}
